#include <stdio.h>
#include "lib_pbc.h"
#include "lpbc_test.h"


void main(void)
{
	FILE* fp = fopen("test.lc.pb", "w"); 
	uint8_t buff[100] = {0};
	size_t buff_len = 0;
	test* tp = newM_test();
	int32_t* dp = NULL;
	info* ip = NULL;
	tp->_a = 11;
	tp->_b = 22;
	tp->_c = 33;

	dp = testM_d_add(tp);
	*dp = 44;
	dp = testM_d_add(tp);
	*dp = 55;
	
	ip = testM_io_add(tp);
	ip->i1 = 66;
	ip->i2 = 77;
	ip = testM_io_add(tp);
	ip->i1 = 88;
	ip->i2 = 99;
	buff_len = testM_serial(tp, buff);
	
	fwrite(buff, buff_len, 1, fp);
	fclose(fp);
	freeM_test(tp);
}